<{include file='customer/head.html'}>
<style type="text/css">
	.attachment_file_del{color: red};
</style>
<body>
	<div class="akrPop">
		<form id="sub_form">
			<ul class="ulForm">
				<li>
					<span>描述：</span>
					<textarea class='remark' name="remark"></textarea>
				</li> 
				<{if $list.status==2}>
				<li>
					<span>研发人员：</span>
					<dl class="dib label_beauty">
						<{foreach $yanfauserlist as $k=>$v}>
						<dd>
							<input type="checkbox" name="yflist" value="<{$v.id}>" id="powerlist_<{$v.id}>" />
							<label for="powerlist_<{$v.id}>"><{$v.displayname}></label>
						</dd>
						<{/foreach}>
					</dl>
				</li>
				<{/if}>
				<li>
					<{if $list.status==0}>
					<{if $pmsuserinfo.isitadministrator==1 || $pmsuserinfo.powerlist & 2}>
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',1)" value="项目经理审核">
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',19)" value="项目经理打回">
					<{/if}>
				<{elseif $list.status==1}>
					<{if $pmsuserinfo.isitadministrator==1 || $pmsuserinfo.powerlist & 4}>
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',2)" value="总经理审核">
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',29)" value="总经理打回">
					<{/if}>
				<{elseif $list.status==2}>
					<{if $pmsuserinfo.isitadministrator==1 || $pmsuserinfo.powerlist & 8}>
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',3)" value="研发审核">
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',39)" value="研发打回">
					<{/if}>
				<{elseif $list.status==3}>
					<{if $pmsuserinfo.isitadministrator==1 || $pmsuserinfo.powerlist & 16}>
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',100)" value="完成">
					<{/if}>
				<{elseif $list.status==100}>
					<{if $pmsuserinfo.isitadministrator==1 || $pmsuserinfo.powerlist & 16}>
					<input type="button" class="akrBtn blue" onclick="verify_status('<{$list.id}>',99)" value="撤销">
					<{/if}>
				<{/if}>
				</li>
			</ul>
		</form>
	</div>

<script type="text/javascript">
	function verify_status(id,value){
		_hcinits.init(['_ajaxs_min','_form_min','_layer_admin_min'],function(){
			var _ajaxs=_hcinits._ajaxs;
			var _form=_hcinits._form;
			var _layer_admin=_hcinits._layer_admin;
			var remark=$('.remark').val();
			var yflist=_form.checkbox('getvalues','yflist',false,',');
			_ajaxs.post('/ProjectRecord/projectRrcordVerify','id='+id+'&verify='+value+'&remark='+remark+'&yflist='+yflist,function(data){
				if(data.status){
					_layer_admin.successMsg(data.message,function(){
						_layer_admin.parentclose();
						parent.verify_return();
					})
				}else{
					_layer_admin.errorMsg(data.message);
				}
			})
		})
	}
</script>
</body>
</html>